package com.ruoyi.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.HistoryMapper;
import com.ruoyi.domain.History;
import com.ruoyi.service.IHistoryService;

/**
 * 历史Service业务层处理
 * 
 * @author ya
 * @date 2025-08-17
 */
@Service
public class HistoryServiceImpl extends ServiceImpl<HistoryMapper, History> implements IHistoryService
{
    @Autowired
    private HistoryMapper historyMapper;

    /**
     * 查询历史
     * 
     * @param id 历史主键
     * @return 历史
     */
    @Override
    public History selectHistoryById(Long id)
    {
        return historyMapper.selectHistoryById(id);
    }

    /**
     * 查询历史列表
     * 
     * @param history 历史
     * @return 历史
     */
    @Override
    public List<History> selectHistoryList(History history)
    {
        return historyMapper.selectHistoryList(history);
    }

    /**
     * 新增历史
     * 
     * @param history 历史
     * @return 结果
     */
    @Override
    public int insertHistory(History history)
    {
        return historyMapper.insertHistory(history);
    }

    /**
     * 修改历史
     * 
     * @param history 历史
     * @return 结果
     */
    @Override
    public int updateHistory(History history)
    {
        return historyMapper.updateHistory(history);
    }

    /**
     * 批量删除历史
     * 
     * @param ids 需要删除的历史主键
     * @return 结果
     */
    @Override
    public int deleteHistoryByIds(Long[] ids)
    {
        return historyMapper.deleteHistoryByIds(ids);
    }

    /**
     * 删除历史信息
     * 
     * @param id 历史主键
     * @return 结果
     */
    @Override
    public int deleteHistoryById(Long id)
    {
        return historyMapper.deleteHistoryById(id);
    }
}
